#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'使用枚举类'

from enum import Enum

Month = Enum('Month',('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))

print(Month.Jan) # Month.Jan

for name, member in Month.__members__.items():
    print(name, '=>', member, ',',member.name,',', member.value,',',dir(member))

'''
Jan => Month.Jan , 1
Feb => Month.Feb , 2
#...
'''